# Integration Makefile

CC = $(CROSS_COMPILE)gcc
AR = $(CROSS_COMPILE)ar
STRIP = $(CROSS_COMPILE)strip
#SRCS := $(SOURCE)
SRCS := $(wildcard *.c) 
OBJS := $(patsubst %.c,%.o, $(SRCS))

RELEASE := t0022-0
CFLAGS := $(COMPILE_FLAGS) -rdynamic -D__x86_64__
LIBS := $(COMPILE_LIBS) -lncurses -lmenu -lm -ldl

.PHONY: all clean

#all:
#	echo $(RELEASE) $(SONAME) $(LIBS)
#	echo $(CFLAGS)

$(RELEASE): $(OBJS)
#	@echo aaa
	@$(CC) $(CFLAGS) $^ $(LIBS) -o $@
	@echo [LK] $^ $(CFLAGS)
	
.c.o:
#	@echo bbb
	@$(CC) -o $@ -c $(CFLAGS) $^
	@echo [CC] $^

clean:
	rm -f $(OBJS) $(RELEASE) $(LIBNAME) $(SONAME)